package one_class_design.tfive_work;

/**
 * @author 北巷_东坡
 * @date 2022/9/18 17:31
 * @computer 10741
 */
public class Company {
    private Employee employee[];
    private double salaries=0;

    public Company(Employee[] employee) {
        this.employee = employee;
    }

    public double salariesPay() {
        salaries=0;
        for(int i=0;i<employee.length;i++) {
            salaries=salaries+employee[i].earnings();
        }
        return salaries;
    }

}
